﻿<Page x:Class="WpfTransform.PageScaleTransform"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="800" Background="LightCoral"
	Title="PageScaleTransform">
    <Page.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="Width" Value="150" />
            <Setter Property="Height" Value="75" />
            <Setter Property="TextWrapping" Value="Wrap" />
            <Setter Property="TextAlignment" Value="Center" />
            <Setter Property="FontSize" Value="15" />
        </Style>
    </Page.Resources>
    <Canvas>
        <TextBlock Text=" "  Canvas.Left="50" Canvas.Top="10" Background="LightBlue"  />
        <TextBlock Text="ScaleTransform   ScaleX 1.2 "  Canvas.Left="50" Canvas.Top="10" 
                   Background="#7700ff00"  >
            <TextBlock.RenderTransform>
                <ScaleTransform   CenterX="0" CenterY="0"  ScaleX="1.2" />
            </TextBlock.RenderTransform>
        </TextBlock>

        <TextBlock Text=" "  Canvas.Left="300" Canvas.Top="10" Background="LightBlue"  />
        <TextBlock Text="ScaleTransform    ScaleY1.5"  Canvas.Left="300" Canvas.Top="10" 
                   Background="#7700ff00"  >
            <TextBlock.RenderTransform>
                <ScaleTransform   CenterX="0" CenterY="0" ScaleY="1.5"   />
            </TextBlock.RenderTransform>
        </TextBlock>

        <TextBlock Text=" "  Canvas.Left="500" Canvas.Top="10" Background="LightBlue"  />
        <TextBlock Text="ScaleTransform   ScaleY1.5 ScaleX 1.2"  Canvas.Left="500" Canvas.Top="10" 
                   Background="#7700ff00"  >
            <TextBlock.RenderTransform>
                <ScaleTransform   CenterX="0" CenterY="0" ScaleX="1.5"   ScaleY="1.5" />
            </TextBlock.RenderTransform>
        </TextBlock>

        <TextBlock Text="ScaleTransform" Padding="0,50,0,0"   Background="LightBlue" x:Name="tb1"  Canvas.Left="70" Canvas.Top="120"  />
        <Rectangle      Canvas.Left="69" Canvas.Top="194"  Height="75" Width="152"
                    RenderTransformOrigin=".5,.5"  >
            <Rectangle.Fill>
                <VisualBrush    Visual="{Binding ElementName=tb1}" />
            </Rectangle.Fill>
            <Rectangle.RenderTransform>
                <ScaleTransform    ScaleY="-1" />
            </Rectangle.RenderTransform>
            <Rectangle.OpacityMask>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#00000000" Offset="0.124"/>
                                    <GradientStop Color="#99FFFFFF" Offset="1"/>
                                </LinearGradientBrush>
            </Rectangle.OpacityMask>
        </Rectangle>


    </Canvas>
</Page>
